<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>预缴租金信息 / 新增</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$filter.field}" type="text" />
                        <input name="value" value="{$filter.value}" type="text" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <in name="$x|default='02-01-11'" value="$rightsCode">
                        <button onclick="submitForm();" class="btn-save btn-highlight">保 存</button>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">保 存</button>
                    </in>
                    <span>或</span>
                    <a class="linkBtn btn-abort" href="/admin/prepay/index">放弃</a>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="prepayForm" method="post" action="">
                <input type="hidden" name="id" id="id" value="{$prepay.id}" />
                <table class="form">
                    <tr>
                        <th width="15%">房源地址<span class="hint">*</span></th>
                        <td width="35%"><input type="text" name="house_addr" /></td>
                        <th width="15%"></th>
                        <td width="35%"></td>
                    </tr>
                    <tr>
                        <th width="15%">姓名<span class="hint">*</span></th>
                        <td width="35%"><input type="text" name="name" /></td>
                        <th width="15%">身份证<span class="hint">*</span></th>
                        <td width="35%"><input type="text" name="idno" /></td>
                    </tr>
                    <tr>
                        <th>电话<span class="hint">*</span></th>
                        <td field="name"><input type="text" name="phone" /></td>
                        <th>预缴金额<span class="hint">*</span></th>
                        <td field="phone"><input type="text" name="amount" /></td>
                    </tr>
                    <tr>
                        <th>租金开始日期</th>
                        <td><input type="text" name="date1" value="" /></td>
                        <th>租金截止日期</th>
                        <td field="date2"><input type="text" name="date2" /></td>
                    </tr>
                    <tr>
                        <th>预缴日期<span class="hint">*</span></th>
                        <td><input type="text" name="pdate" value="{$a|default=time()|date='Y/m/d',###}" /></td>
                        <th>备注</th>
                        <td field="remarks"><input type="text" name="remarks" /></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<link type="text/css" href="__JS__/datetimepicker/pikaday.css" rel="stylesheet">
<script src="__JS__/datetimepicker/pikaday.min.js" type="text/javascript"></script>
<link type="text/css" href="__JS__/autocomplete2/src/jquery.autocomplete.min.css" rel="stylesheet">
<script src="__JS__/autocomplete2/src/jquery.autocomplete.js" type="text/javascript"></script>
<script src="__JS__/prepay.js?v=0.6" type="text/javascript" ></script>
<script>
    $('input[name=house_addr]').autocomplete({
        serviceUrl: '/admin/prepay/ajax_SearchHouseByAddr',
        extraParams: {house_addr: $.trim($("input[name=house_addr]").val())},//动态参数值
        paramName: "house_addr",//自定义的参数名 必须和extraParams 参数名相同
        showNoSuggestionNotice: true,
        noSuggestionNotice: '对不起，没有匹配到房源编号',
        onSelect: function (suggestion) {
            $("input[name=name]").val(suggestion.data.zhname);
            $("input[name=phone]").val(suggestion.data.phone);
            $("input[name=idno]").val(suggestion.data.zhidno);
        }
    });
</script>
<include file="Public:footer" />
